Monthly and yearly consumptions [deprecated]
curl --request GET \
--url https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptionsimport requests
url = "https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"monthlyGasEnergies": [
{
"month": "2023-01",
"beginDay": "2023-11-05",
"endDay": "2023-12-28",
"consumption": {
"energy": 123,
"energyM3": 123,
"conversionFactor": 123,
"cost": 123
},
"standingCharge": 123,
"totalCost": 123,
"source": "SMART",
"nature": "REEL"
}
],
"yearlyGasEnergies": [
{
"year": "2023",
"beginDay": "2023-01-10",
"endDay": "2023-12-16",
"consumption": {
"energy": 123,
"energyM3": 123,
"conversionFactor": 123,
"cost": 123
},
"standingCharge": 123,
"totalCost": 123,
"source": "SMART",
"nature": "REEL"
}
]
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}This response has no body data.Gas energy consumptions
Monthly and yearly consumptions [deprecated]
deprecated
The service returns the monthly and yearly gas consumptions of a given site between two specified dates.
GET
/
v2
/
sites
/
{site-id}
/
compositions
/
monthly-gas-consumptions
Monthly and yearly consumptions [deprecated]
curl --request GET \
--url https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptionsimport requests
url = "https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/sites/{site-id}/compositions/monthly-gas-consumptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"monthlyGasEnergies": [
{
"month": "2023-01",
"beginDay": "2023-11-05",
"endDay": "2023-12-28",
"consumption": {
"energy": 123,
"energyM3": 123,
"conversionFactor": 123,
"cost": 123
},
"standingCharge": 123,
"totalCost": 123,
"source": "SMART",
"nature": "REEL"
}
],
"yearlyGasEnergies": [
{
"year": "2023",
"beginDay": "2023-01-10",
"endDay": "2023-12-16",
"consumption": {
"energy": 123,
"energyM3": 123,
"conversionFactor": 123,
"cost": 123
},
"standingCharge": 123,
"totalCost": 123,
"source": "SMART",
"nature": "REEL"
}
]
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}This response has no body data.Path Parameters
The site identifier
Query Parameters
The starting month (included) to return monthly and yearly gas consumptions from.
The ending month (excluded) until which to return monthly and yearly gas consumptions from.
Indicates if the consumption should be calculated with smart meter data.